<template>
    <div>
        <BlockUI :html="loadingHtml" v-if="show" />
    </div>
</template>


<script>
import Vue from 'vue'
import BlockUI from 'vue-blockui'
import {mapGetters,mapState} from 'vuex'

Vue.use(BlockUI)

export default {
    name: 'loadingMask',
    computed: {
    ...mapState({
      'show' : state => state.global.widgets.loadingMask.show,
      'loadingHtml': state => {
        let loadingMask = state.global.widgets.loadingMask;
        return loadingMask.type.replace('{{message}}',loadingMask.tips)
      }
    })
  },
}
</script>

<style src="@/vendor/libs/spinkit/spinkit.scss" lang="scss"></style>
